// 整个项目api的管理

import request from "./request";
export default {
    //home组件 左侧表格数据获取
    getTableData(parms){
        return request({
            url:'/home/getTableData',
            method:'get',
            data:parms,
            mock:true
        })
    },
    getCountData(){
        return request({
            url:'/home/getCountData',
            method:'get',
            mock:true
        })
    },
    getChartData(){
        return request({
            url:'/home/getChartDate',
            method:'get',
            mock:true
        })
    },
    getUser(params){
        return request({
            url:'/user/getUser',
            method:'get',
            mock:false,
            data:params
        })
    },
    addUser(params){
        return request({
            url:'/user/addUser',
            method:'post',
            mock:false,
            data:params
        })
    },
    editUser(params){
        return request({
            url:'/user/editUser',
            method:'post',
            mock:false,
            data:params
        })
    },
    deleteUser(params){
        return request({
            url:'/user/deleteUser',
            method:'post',
            mock:false,
            data:params
        })
    },
    //根据用户的用户名不同，返回不一样的菜单列
    getMenu(params){//params是用户的用户名和密码
        return request({
            url:'/permission/getMenu',
            method:'post',
            mock:false,
            data:params
        })
    }
}